package com.matt.domain;

import com.matt.foundation.retention.FieldMeta;
import com.matt.foundation.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;

/**
 * *******************************
 * 客户
 * Created by Ron.
 * form com.matt
 * on 2018/6/13
 * *******************************
 */
@Data
@Entity
@Table(name = "clientele")
@EqualsAndHashCode(callSuper = true)
public class Clientele extends Domain {


   // @Column(columnDefinition = "int default 1 COMMENT '线索渠道 1：电话联系  2：到店来访  3：网络联系  4：转介绍 5：地推  6：异地合作 7:市场活动 8：系统导入'")
   // private Integer channelStatus = 1;

    @Column(columnDefinition = "varchar(50) COMMENT '线索来源id'")
    private String channelId;

    @FieldMeta(name="线索来源")
    @Column(columnDefinition = "varchar(50) COMMENT '线索来源名称'")
    private String channel;

    @FieldMeta(name="介绍人")
    @Column(columnDefinition = "varchar(30) COMMENT '介绍人==客户'")
    private String fromUser;

    @Column(columnDefinition = "varchar(32) COMMENT '介绍人id=客户id'")
    private String fromUserId;

    @Column(columnDefinition = "int default 1 COMMENT '线索类型 1：主动， 2：被动'")
    private Integer category;

    @FieldMeta(name = "客户状态")
    @Column(columnDefinition = "int default 1 COMMENT ' 客户状态   1:未处理->(沟通中)  2：已预约->(已邀约)  3：已到访  4：已完成申请表 5：已面试  6：已交定金  7：面试不通过 8：方案不满意  9：园区不满意 10：无支付支付能力  11:已成交'")
    private Integer status=1;

    @Column(columnDefinition = "varchar(50) COMMENT '客户状态值'")
    private String statusVal;


    @Column(columnDefinition = "int default 0 COMMENT '客户成交状态  0：未成交  1：已成交'")
    private Integer signStatus=0;

    @Column(columnDefinition = "varchar(100) COMMENT '建议名'")
    private String adviceName;

    @Column(columnDefinition = "varchar(50) COMMENT '系统孩子名'")
    private String sysChildName;  //改变

    @FieldMeta(name = "孩子姓名")
    @Column(columnDefinition = "varchar(50) COMMENT '孩子姓名'") //不变
    private String childName;

    @FieldMeta(name = "孩子生日")
    @Column(columnDefinition = "datetime COMMENT '孩子生日'")
    private Date birthday;

    @FieldMeta(name = "孩子昵称")
    @Column(columnDefinition = "varchar(50) COMMENT '孩子昵称'")
    private String nickName;

    @FieldMeta(name = "英文名")
    @Column(columnDefinition = "varchar(50) COMMENT '英文名称'")
    private String englishName;

    @FieldMeta(name = "性别")
    @Column(columnDefinition = "int default 0 COMMENT '性别 1：男  0：女'")
    private Integer gender;

    @FieldMeta(name = "血型")
    @Column(columnDefinition = "varchar(50) COMMENT '血型'")
    private String bloodType;

    @FieldMeta(name = "国籍")
    @Column(columnDefinition = "varchar(50) COMMENT '国籍'")
    private String nationality;

    @FieldMeta(name = "幼儿园")
    @Column(columnDefinition = "varchar(100) COMMENT '目标幼儿园'")
    private String targetGarden;

    @FieldMeta(name = "户籍所在地")
    @Column(columnDefinition = "varchar(255) COMMENT '户籍所在地'")
    private String registerResidence;

    @FieldMeta(name = "户籍类型")
    @Column(columnDefinition = "varchar(50) COMMENT '户籍类型'")
    private String registerType;

    @FieldMeta(name = "语言环境")
    @Column(columnDefinition = "varchar(50) COMMENT '所处语言环境'")
    private String languageEnvironment;

    @FieldMeta(name = "姓名")
    @Column(columnDefinition = "varchar(50) COMMENT '姓名'")
    private String name;

    @FieldMeta(name = "客户分类")
    @Column(columnDefinition = "varchar(50) COMMENT '客户分类 A：(A类：有支付能力也有消费意愿) B：(B类：有支付能力消费意愿一般) C:(C类：有能力支付受限消费意愿强烈) D:(D类：无支付能力)'")
    private String clienteleType;

    @FieldMeta(name = "关系")
    @Column(columnDefinition = "varchar(50) COMMENT '关系'")
    private String relationship;

    @FieldMeta(name = "联系电话")
    @Column(columnDefinition = "varchar(20) COMMENT '联系电话'")
    private String mobile;

    @FieldMeta(name = "家庭住址")
    @Column(columnDefinition = "varchar(100) COMMENT '家庭住址'")
    private String homeAddress;

    @FieldMeta(name = "工作单位")
    @Column(columnDefinition = "varchar(50) COMMENT '工作单位'")
    private String company;

    @FieldMeta(name = "职务")
    @Column(columnDefinition = "varchar(50) COMMENT '职务'")
    private String duty;

    @FieldMeta(name = "学历")
    @Column(columnDefinition = "varchar(50) COMMENT '学历'")
    private String degree;

    @Column(columnDefinition = "varchar(32) COMMENT '客户所属'")
    private String staffId;

    @Column(columnDefinition = "varchar(50) COMMENT '员工姓名'")
    private String staffName;

    @Column(columnDefinition = " datetime DEFAULT NOW() COMMENT '最后更新时间' ")
    private Date lastModified;

    @Column(columnDefinition = "varchar(32) COMMENT '最后更新人'")
    private String lastModifiedId;

    @Column(columnDefinition = "varchar(32) COMMENT '线索id'")
    private String leadsId;

    @Column(columnDefinition = "varchar(32) COMMENT '所属园区'")
    private String areaId;

    @Column(columnDefinition = " datetime COMMENT '上次跟进时间' ")
    private Date lastFollowTime;

    //最新跟进记录==跟进中的内容
    @Column(columnDefinition = "longtext COMMENT '最近跟进记录'")
    private String lastFollowRecord;

    @Transient
    private String classNames;

}
